Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adopt prio 0.15.0 #1916

Merged
merged 4 commits into from
Sep 13, 2023
Merged

Adopt prio 0.15.0 #1916

merged 4 commits into from
Sep 13, 2023

Conversation

tgeoghegan
Copy link
Contributor

No description provided.

@tgeoghegan tgeoghegan requested a review from a team as a code owner September 12, 2023 00:39
@@ -20,7 +20,7 @@ hex = "0.4"
num_enum = "0.7.0"
# We can't pull prio in from the workspace because that would enable default features, and we do not
# want prio/crypto-dependencies
prio = { version = "0.14.1", features = ["multithreaded"] }
prio = { version = "0.15.0", default-features = false, features = ["multithreaded"] }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a bug I introduced in #1805: we should not enable default features on prio in janus_messages.

Copy link
Collaborator

@divergentdave divergentdave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one suggestion in several places regarding the chunk length for Prio3SumVec. (This will mostly evaporate once we outsource the chunk length to whoever chooses task parameters)

core/src/task.rs Outdated
2,
*bits,
*length,
janus_core::task::VdafInstance::chunk_size(*length),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll want to compute this from the total encoded measurement length (since the validity circuit only cares about bits, not our vector of integers)

Suggested change
janus_core::task::VdafInstance::chunk_size(*length),
janus_core::task::VdafInstance::chunk_size(*bits * *length),

2,
*bits,
*length,
VdafInstance::chunk_size(*length),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

Suggested change
VdafInstance::chunk_size(*length),
VdafInstance::chunk_size(*bits * *length),

2,
*bits,
*length,
VdafInstance::chunk_size(*length),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
VdafInstance::chunk_size(*length),
VdafInstance::chunk_size(*bits * *length),

2,
*bits,
*length,
VdafInstance::chunk_size(*length),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
VdafInstance::chunk_size(*length),
VdafInstance::chunk_size(*bits * *length),

let vdaf_client = Prio3::new_sum_vec_multithreaded(2, bits, length)
.context("failed to construct Prio3SumVec VDAF")?;
let vdaf_client =
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(length))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(length))
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(bits * length))

let vdaf = Prio3::new_sum_vec_multithreaded(2, bits, length)
.context("failed to construct Prio3SumVec VDAF")?;
let vdaf =
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(length))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(length))
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(bits * length))

let vdaf = Prio3::new_sum_vec_multithreaded(2, bits, length)
.context("failed to construct Prio3SumVec VDAF")?;
let vdaf =
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(length))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(length))
Prio3::new_sum_vec_multithreaded(2, bits, length, VdafInstance::chunk_size(bits * length))

@@ -463,14 +467,15 @@ where
.map_err(|err| Error::Anyhow(err.into()))
}
(VdafType::SumVec, Some(length), Some(bits)) => {
let vdaf =
Prio3::new_sum_vec(2, bits, length).map_err(|err| Error::Anyhow(err.into()))?;
let vdaf = Prio3::new_sum_vec(2, bits, length, VdafInstance::chunk_size(length))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let vdaf = Prio3::new_sum_vec(2, bits, length, VdafInstance::chunk_size(length))
let vdaf = Prio3::new_sum_vec(2, bits, length, VdafInstance::chunk_size(bits * length))

2,
*bits,
*length,
VdafInstance::chunk_size(*length),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
VdafInstance::chunk_size(*length),
VdafInstance::chunk_size(*bits * *length),

@tgeoghegan tgeoghegan merged commit 0914505 into main Sep 13, 2023
@tgeoghegan tgeoghegan deleted the timg/prio-0.15.0 branch September 13, 2023 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants